package edu.mercer.sse554.bkp;

/**
 * Custom Throwable.<p>
 * 
 * Visitor Pattern: accepts visitor for logging this Throwable.<p>
 * 
 * @see VisitableLogging
 * 
 * @see BackupErrorLoggingVisitor 
 */

public class BackupThrowable extends Throwable

	implements VisitableLogging<Boolean, 
								BackupErrorLoggingVisitor>
{
	private static final long serialVersionUID = -1335158936144404835L;

	/**
	 * Create new custom Throwable: BackupThrowable.<p> 
	 */
	
	BackupThrowable()
	{
		super();
		
	}//constructor

	
	/**
	 * Create new BackupThrowable custom Throwable.<p> 
	 * 
	 * @param throwableIn - Throwable to be wrapped into this custom 
	 * 	Throwable
	 */
		
	BackupThrowable(final Throwable throwableIn)
	{
		super(throwableIn);
		
	}//constructor

	
	/**
	 * Create new BackupThrowable custom Throwable.<p> 
	 * 
	 * @param errDescription - String String descriptive message to include 
	 * 	when creating Throwable
	 * 
	 * @param errorIn - Throwable Throwable to be wrapped into this custom 
	 * 	Throwable
	 */
	
	BackupThrowable(final String errDescription, 
					final Throwable errorIn)
	{
		super(errDescription, errorIn);
		
	}//constructor


	@Override
	public Boolean accept( BackupErrorLoggingVisitor visitor ) 
	{
		return visitor.visit( this );
		
	}//method


}//class
